asm/atomic.h: implement missing and add common prototypes
authorCorneliu ZUZU <czuzu@bitdefender.com>
Fri, 15 Jul 2016 10:46:46 +0000 (13:46 +0300)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 15 Jul 2016 12:33:57 +0000 (13:33 +0100)
commitc98c80084d77d9963d5f6afe75d2b10cee0efc26
tree5b3dc97804271b5d4d7305b92adcad32b86fcf6d
parentdc8ed019c4dff150f20a942d09d9f39a9e19c7df
asm/atomic.h: implement missing and add common prototypes

ARM (<asm-arm/atomic.h>):
* add atomic_add_unless() wrapper over __atomic_add_unless()
  (for common-code interface, i.e. <xen/atomic.h>)

X86 (<asm-x86/atomic.h>):
* implement missing functions atomic_{sub,inc,dec}_return(), atomic_add_unless()
* implement missing macro atomic_xchg()

COMMON (<xen/atomic.h>):
* add prototypes for the aforementioned newly implemented X86 functions in
  common <xen/atomic.h>

Signed-off-by: Corneliu ZUZU <czuzu@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/include/asm-arm/atomic.h
xen/include/asm-x86/atomic.h
xen/include/xen/atomic.h